<%@page import="bll.EnumName"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.util.*,util.*,dal.*,model.*, bll.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Register</title>
<link rel="stylesheet" href="css/common.css" />
<link rel="stylesheet" href="css/inputForm.css" />
<link rel="stylesheet" href="css/listForm.css" />
<link rel="stylesheet" href="css/jquery-ui-1.8.14.custom.css" type="text/css" />
<link rel="stylesheet" href="css/hyjack.css" type="text/css" />
<link rel="stylesheet" href="css/datepicker.css" type="text/css" />
<link rel="stylesheet" href="css/themes/ui-lightness/jquery.ui.all.css" />
<link rel="stylesheet" href="css/jquery-ui-timepicker.css" type="text/css" />
<link rel="stylesheet" href="css/jquery-datepicker.css" />
<link rel="stylesheet" href="css/jquery-dialog.css" />

<script language="javascript" type="text/javascript" src="js/datepicker.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.hyjack.select.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.ui.core.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.ui.widget.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.ui.timepicker.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.ui.datepicker.js"></script>
<script language="javascript" type="text/javascript" src="js/datepicker.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.hyjack.js"></script>
<script language="javascript" type="text/javascript" src="js/ajaxQuickInsert.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.numeric.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.ui.tools.min.js"></script>
<script language="javascript" type="text/javascript" src="js/common.js"></script>


<script language="javascript" type="text/javascript">
$(document).ready(pageLoaded);

function pageLoaded()
{
	turnOnNumbericInput();
	initTooltip();	
} 

var requiredInputs = [['username','username_required'],['password','password_required'],['email','email_required']];
var intInputs = [];
var doubleInputs = [];
var dateInputs = [];
var timeInputs = [];


function checkInputs() {
	var valid = true;

	if (checkRequiredInputs(requiredInputs) == false) {
		valid = false;
	}
	if (checkIntInputs(intInputs) == false) {
		valid = false;
	}
	if (checkDoubleInputs(doubleInputs) == false) {
		valid = false;
	}
	if (checkDateInputs(dateInputs) == false) {
		valid = false;
	}
	if (checkTimeInputs(timeInputs) == false) {
		valid = false;
	}

	// SPECIFIC VALIDATE CODE HERE		

	return valid;
}

	
</script>
</head>
<body>
	<div class="divContainer">
				<form id="inputForm" action="account?mode=insert" method="post" onSubmit="return checkInputs()">
					<table class="tblInput">
						<tr>
							<td class="inputHeader">REGISTER FOR NEW ACCOUNT</td>
						</tr>
						<tr>
					<td style="padding-left: 400px; padding-right: 400px;">
						<table cellspacing="0px">
						
						<tr class="trField">
							<td class="tdFieldName">User Name</td>
							<td class="tdFieldInput">
								<input class="inputText" type="text" id="username" name="username" maxlength="25" title="User name of new account. Note: Required." onblur="validateRequiredInput('user_name');"/>
							</td>
							<td class="tdErrMsg">
								<span id="username_required" class="errMsg" style="display: none;" title="User name is required">(!)</span> 
								
							</td>
						</tr>
						
						<tr class="trField">
							<td class="tdFieldName">Password</td>
							<td class="tdFieldInput">
								<input class="inputText" type="password" id="password" name="password" maxlength="25" title="Password of new account. Note: Required." onblur="validateRequiredInput('password');"/>
							</td>
							<td class="tdErrMsg">
								<span id="password_required" class="errMsg" style="display: none;" title="Password is required">(!)</span> 
								
							</td>
						</tr>
						
						<tr class="trField">
							<td class="tdFieldName">Email</td>
							<td class="tdFieldInput">
								<input class="inputText" type="text" id="email" name="email" maxlength="255" title="Email of new account. Note: Required." onblur="validateRequiredInput('email');"/>
							</td>
							<td class="tdErrMsg">
								<span id="email_required" class="errMsg" style="display: none;" title="Email is required">(!)</span> 
								
							</td>
						</tr>
							
						
						<tr class="trInputBottom">

							<td colspan="7" class="tdSubmit" style="text-align: center;"><input class="btnSubmit" type="submit" value="Register" title="Click to register with above information."/></td>

						</tr>
					</table>
				</td>
			</tr>
		</table>
	</form>
	
	</div>
</body>
</html>